package com.example.demo.context;

/**
 * @author yuaneg 2018/12/12
 */
public class TxTransactionContext {

    private static ThreadLocal<String> hold = new ThreadLocal<>();

    public static String getTransactionId() {
        return hold.get();
    }

    public static void setTransactionId(String transactionId) {
        hold.set(transactionId);
    }

    public static void cleanTransactionId(){
        hold.remove();
    }
}
